package lab02.test06;

import java.util.Scanner;

public class Test01 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        Triangle triangle=new Triangle();
        System.out.println("请输入三角形的三边：");
        double a = sc.nextDouble();
        double b = sc.nextDouble();
        double c = sc.nextDouble();
        triangle.setA(a);
        triangle.setB(b);
        triangle.setC(c);

        if (triangle.triangle() == true){
               System.out.println("该三角形的周长为" + triangle.length());
                System.out.println("该三角形的面积为" + triangle.area());
                System.out.println("请输出要改的值：");
                double arevise = sc.nextDouble();
                double brevise = sc.nextDouble();
                double crevise = sc.nextDouble();
                triangle.revise(arevise,brevise,crevise);
            }else
               System.out.println("该三边不能构成三角形。");
        }
    }

